<script language="JavaScript">
function toggle(source) {
  checkboxes = document.getElementsByName('delete_id[]');
  for(var i=0, n=checkboxes.length;i<n;i++) {
    checkboxes[i].checked = source.checked;
  }
}
function is_check() {
	  checkboxes = document.getElementsByName('delete_id[]');
	  for(var i=0, n=checkboxes.length;i<n;i++) {
	    if(checkboxes[i].checked) return true;
	  }
	  return false;
	}
</script>
<?php echo anchor(base_url(),"Home");?>
&nbsp
<?php echo anchor("plugin/Plugin/create","Create");?>
<!--search meta data-->
<?php echo $meta_search_form;?>

<form action="<?php echo site_url('plugin/Plugin/delete_all');?>" method="post" onsubmit="return is_check()">
<table>
  <tr>
  	<th><input type="checkbox" onClick="toggle(this)" /></th>
    <th>No</th>
    <th>Plugin</th>
    <th>Version</th>
    <th>Description</th>
    <th>Author</th>
    <th>Email</th>
  </tr>
  
<?php 
	$i=0;
	if(isset($results)) : foreach($results as $row):
	$i++;
	?>
  <tr>
  	<td><input type="checkbox" name="delete_id[]" value="<?php echo $row->id;?>"></td>
  	<td><?php echo $i;?></td>
    <td><?php echo $row->plugin_name;?></td>
    <td><?php echo $row->version;?></td>
    <td><?php echo $row->description;?></td>
    <td><?php echo $row->author;?></td>
    <td><?php echo $row->email;?></td>
  </tr>
    <?php endforeach;?>
    <?php endif;?>
</table>
<input type="submit" name="delete" value="Delete" />
</form>
<?php echo $pagination_link;?>